package org.x.user.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.x.user.entity.SysMenuEntity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class MenuTreeVO {
    @Id(keyType = KeyType.Auto)
    private Long menuId;
    /**
     * 菜单名称
     */
    @Column(value = "name")
    private String name;

    /**
     * 图标标识
     */
    @Column(value = "icon")
    private String icon;

    /**
     * 前端路由路径
     */
    @Column(value = "path")
    private String path;

    /**
     * 父菜单ID
     */
    @Column(value = "parent_id")
    private Long parentId;

    /**
     * 排序
     */
    @Column(value = "sort")
    private Integer sort;

    /**
     * 关联权限ID
     */
    @Column(value = "acl_id")
    private Long aclId;

    /**
     * 逻辑删除标识
     */
    @Column(value = "is_delete")
    private Integer isDelete;
    /**
     * 创建时间
     */
    @Column(value = "created_time")
    private Date createdTime;

    /**
     * 子菜单列表
     */
    @JsonProperty("children")
    private List<MenuTreeVO> children = new ArrayList<>();
}
